<?php get_header(); ?>

<?php if (have_posts()) : ?>

<div class="col3a">

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>				
		<h3 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h3>
		
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h3 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h3>
		
	 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h3 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h3>

		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h3 class="pagetitle">Archive for <?php the_time('Y'); ?></h3>
		
	  <?php /* If this is a search */ } elseif (is_search()) { ?>
		<h3 class="pagetitle">Search Results</h3>
		
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h3 class="pagetitle">Author Archive</h3>

		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h3 class="pagetitle">Blog Archives</h3>

		<?php } ?>
</div>

<div class="clear"></div>

<?php while (have_posts()) : the_post(); ?>

<div class="lead">
<div class="col">
<div class="leadimg">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php echo catch_that_image() ?>" alt="<?php the_title(); ?>"  /></a>
</div>
</div>

<div class="col2">

<div class="entry">
<?php the_excerpt(); ?>
<div class="more"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">Read on</a></div>
<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
</div>

</div>

<div class="col3">
<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

<div class="post-date">
<div class="post-day"><?php the_time('d') ?></div>
<div class="post-month"><?php the_time('M') ?></div> 
<div class="post-cat">Topic: <?php the_category(', ') ?></div> 
<div class="post-tags"><?php if(function_exists('the_tags')) {$my_tags = get_the_tags();if ( $my_tags != "" ){ the_tags('Tags: ', ', ', ''); } else {echo "Tags: None";} }?>
<?php if(function_exists('UTW_ShowTagsForCurrentPost')) { echo 'Tags: ';UTW_ShowTagsForCurrentPost("commalist");echo ''; } ?></div>
<div class="post-cc"><?php comments_number('[ 0 ]', '[ 1 ]', '[ % ]' );?></div>
<?php edit_post_link('<span class="post-month">[ Edit ]</span>','',''); ?>
</div>

</div>

</div>

<?php endwhile; else: ?><?php endif; ?>

<div class="clear"></div>
<div class="leada">

<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi('', '', '', '', 3, false);} ?>
</div>

<div class="col3a">
<?php include(TEMPLATEPATH."/inc/searchform.php");?>
</div>
</div>

<?php include(TEMPLATEPATH."/inc/tab.php");?>
</div>

<?php include(TEMPLATEPATH."/inc/footer.php");?>